SUB PrintFile(thefile$)
SHARED FileNum
FileNum = FileNum
OPEN thefile$ FOR INPUT AS FileNum
OPEN “LPT1:PROMPT”FOR OUTPUT AS FileNum+1
WHILE NOT EOF(FileNum)
LINE INPUT $FileNum,a$
PRINT $FileNum+1, a$
WEND
CLOSE $FileNum+1
CLOSE $FileNum
FileNum = FileNum - 1
END SUB

SUB TypeFile(myfile$)
SHARED FileNum
FileNum = FileNum +1
DoWind(1)
OPEN myfile$ FOR INPUT AS FileNum
WHILE NOT EOF(FileNum)
LINE INPUT $FileNum,a$
PRINT a$
WEND
CLOSE $FileNum
FileNum = FileNum - 1
DitchWind
END SUB

Sub KillFiles
f$ = “null"
WHILE f$ <>”"
f$ = FILES$(1)
IF f$<>”"THEN
KILL f$
END IF
WEND
END SUB

SUB MsgDialog(msg$,style%) SHARED
cancel% = 0
DoDWind
LOCATE 2,2
PRINT msg$
BUTTON 50,1,”OK”,(left+20,bottom-160,)-(left+120,bottom-145),1
IF style% = 2 THEN
BUTTON 51,1,”Cancel”,(left+135,bottom-160,)-(left+235,bottom-145),1
END IF
WHILE DIALOG (0)=0
WEND
WHILE DIALOG(0)<>1
WEND
x=DIALOG(1)
IF x = 51 THEN cancel%=1
END SUB

SUB DoWind(kind%) SHARED
WindEx =WindEx + 1
WINDOW WindEx,””,(left,top)-(right,bottom),kind%
END SUB

SUB DoDWind SHARED
WindEx = WindEx + 1
WINDOW WindEx,””,(left-5,top+10)-(right+5,bottom-100),2
END SUB

SUB DitchWind SHARED
WINDOW CLOSE WindEx
WindEx = WindEx - 1
END SUB

SUB HPrintFile(ThFile$)
SHARED FileNum
Counter% = 1
Loop% = 1
FileNum = FileNum + 1
Tmp$ = “File: “ + ThFile$
Tmp% = LEN(tmp$)
Tmpl% = LEN(“Page Number: XX”)
Tmp% = (80-*tmp% + tmpl%))
OPEN ThFile$ FOR INPUT AS FileNum
OPEN “LPT1:PROMPT”FOR OUTPUT AS FileNum + 1
i$ = “File: “ + ThFile$ + “ + “Page Number: “ + (STR$(Counter%))
WHILE NOT EOF(FileNum)
IF LOOP% = 1 THEN
PRINT #FileNum + 1, i$
PRINT #FileNum + 1, “"
Loop% = 3
END IF
LINE INPUT #FileNum + 1, a$
PRINT #FileNum + 1, a$
Counter% = Counter% + 1
Loop% = Loop% + 1
IF Loop% = 33 THEN
PRINT #FileNum + 1, “”
PRINT #FileNum + 1, SPC(24)
PRINT #FileNum + 1, “Date: “;DATE$; “   “;Time:  “;TIME$
PRINT #FileNum + 1, “”
Loop% = 1
END IF
WEND
CLOSE #FileNum
CLOSE #FileNum + 1
FileNum = FileNum - 1
END SUB